class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: E = None
        self.t: B = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: B = None
        self.u: B = None
        self.t: C = None
        self.v: F = None
        self.q: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: B = None
        self.u: B = None
        self.t: C = None
        self.v: F = None
        self.q: B = None
        self.txt = txt

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

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

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

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