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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: F = None
        self.o: D = None
        self.v: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: C = None
        self.o: E = None
        self.w: D = None
        self.r: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: F = None
        self.o: D = None
        self.v: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: C = None
        self.o: E = None
        self.w: D = None
        self.r: F = None
        self.txt = txt

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

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