class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: F = None
        self.y: D = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: E = None
        self.p: C = None
        self.w: C = None
        self.x: F = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: E = None
        self.w: B = None
        self.o: F = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: D = None
        self.u: C = None
        self.z: E = None
        self.v: A = None
        self.w: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: D = None
        self.o: D = None
        self.z: A = None
        self.r: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: E = None
        self.p: C = None
        self.w: C = None
        self.x: F = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: E = None
        self.w: B = None
        self.o: F = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: D = None
        self.u: C = None
        self.z: E = None
        self.v: A = None
        self.w: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: D = None
        self.o: D = None
        self.z: A = None
        self.r: C = None
        self.txt = txt

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

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