class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: D = None
        self.s: G = None
        self.p: D = None
        self.o: D = None
        self.z: D = None
        self.r: C = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: G = None
        self.t: E = None
        self.o: B = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: D = None
        self.q: C = None
        self.w: H = None
        self.y: E = None
        self.u: B = None
        self.t: A = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: B = None
        self.p: D = None
        self.z: F = None
        self.r: G = None
        self.w: A = None
        self.q: A = None
        self.txt = txt

a = A("a")
h = B("h")
k = C("k")
c = D("c")
m = E("m")
j = F("j")
g = G("g")
i = H("i")
l = E("l")
b = B("b")

a.p = k
h.x = k
k.x = m
k.t = i
c.x = i
c.r = h
m.u = l
m.w = c
m.p = c
m.o = c
m.z = c
m.s = g
m.r = k
m.x = i
j.y = c
j.r = g
j.t = l
j.o = b
j.p = a
g.o = c
g.r = c
g.q = k
g.w = i
g.y = m
g.u = b
g.p = b
g.t = a
i.s = a
i.w = a
i.q = a
i.v = h
i.p = c
i.z = j
i.r = g
l.u = m
l.w = c
l.p = c
l.o = c
l.z = c
l.s = g
l.r = k
l.x = i
b.x = k
assert m.s.y.x.txt == "
class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: D = None
        self.s: G = None
        self.p: D = None
        self.o: D = None
        self.z: D = None
        self.r: C = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: G = None
        self.t: E = None
        self.o: B = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: D = None
        self.q: C = None
        self.w: H = None
        self.y: E = None
        self.u: B = None
        self.t: A = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: B = None
        self.p: D = None
        self.z: F = None
        self.r: G = None
        self.w: A = None
        self.q: A = None
        self.txt = txt

a = A("a")
h = B("h")
k = C("k")
c = D("c")
m = E("m")
j = F("j")
g = G("g")
i = H("i")
l = E("l")
b = B("b")

a.p = k
h.x = k
k.x = m
k.t = i
c.x = i
c.r = h
m.u = l
m.w = c
m.p = c
m.o = c
m.z = c
m.s = g
m.r = k
m.x = i
j.y = c
j.r = g
j.t = l
j.o = b
j.p = a
g.o = c
g.r = c
g.q = k
g.w = i
g.y = m
g.u = b
g.p = b
g.t = a
i.s = a
i.w = a
i.q = a
i.v = h
i.p = c
i.z = j
i.r = g
l.u = m
l.w = c
l.p = c
l.o = c
l.z = c
l.s = g
l.r = k
l.x = i
b.x = k
assert m.s.y.x.txt == "i"