class A:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: D = None
        self.x: F = None
        self.r: A = None
        self.z: B = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: A = None
        self.r: A = None
        self.u: A = None
        self.v: B = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: C = None
        self.r: E = None
        self.z: B = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: F = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

h = A("h")
g = B("g")
b = C("b")
j = D("j")
e = E("e")
f = F("f")
c = E("c")
k = A("k")
n = B("n")
d = C("d")

h.w = k
h.r = k
h.s = j
h.x = f
h.z = g
h.y = c
g.q = n
g.v = n
g.y = h
g.r = h
g.u = h
g.o = h
b.v = j
b.t = d
b.r = e
b.x = e
b.z = n
j.z = d
e.p = j
e.z = f
e.t = b
f.o = d
c.p = j
c.z = f
c.t = b
k.w = h
k.r = h
k.s = j
k.x = f
k.z = g
k.y = e
n.q = g
n.v = g
n.y = k
n.r = h
n.u = h
n.o = h
d.v = j
d.t = b
d.r = c
d.x = c
d.z = g
assert c.t.t.v.z.t.x.txt == "
class A:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: D = None
        self.x: F = None
        self.r: A = None
        self.z: B = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: A = None
        self.r: A = None
        self.u: A = None
        self.v: B = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: C = None
        self.r: E = None
        self.z: B = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: F = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

h = A("h")
g = B("g")
b = C("b")
j = D("j")
e = E("e")
f = F("f")
c = E("c")
k = A("k")
n = B("n")
d = C("d")

h.w = k
h.r = k
h.s = j
h.x = f
h.z = g
h.y = c
g.q = n
g.v = n
g.y = h
g.r = h
g.u = h
g.o = h
b.v = j
b.t = d
b.r = e
b.x = e
b.z = n
j.z = d
e.p = j
e.z = f
e.t = b
f.o = d
c.p = j
c.z = f
c.t = b
k.w = h
k.r = h
k.s = j
k.x = f
k.z = g
k.y = e
n.q = g
n.v = g
n.y = k
n.r = h
n.u = h
n.o = h
d.v = j
d.t = b
d.r = c
d.x = c
d.z = g
assert c.t.t.v.z.t.x.txt == "e"