class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: B = None
        self.s: B = None
        self.q: D = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: C = None
        self.x: B = None
        self.r: C = None
        self.y: D = None
        self.q: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: D = None
        self.y: F = None
        self.txt = txt

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

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

b = A("b")
h = B("h")
e = C("e")
c = D("c")
d = E("d")
g = F("g")
a = D("a")
k = F("k")
i = B("i")
m = E("m")

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: C = None
        self.x: B = None
        self.r: C = None
        self.y: D = None
        self.q: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: D = None
        self.y: F = None
        self.txt = txt

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

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

b = A("b")
h = B("h")
e = C("e")
c = D("c")
d = E("d")
g = F("g")
a = D("a")
k = F("k")
i = B("i")
m = E("m")

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