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

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

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

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

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

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

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

b.o = e
b.s = g
g.q = b
g.y = b
g.x = e
e.s = b
e.t = b
e.q = h
e.z = a
e.y = c
a.t = e
l.x = f
l.t = f
l.q = a
f.t = b
f.z = b
f.u = a
f.p = e
f.x = e
f.s = l
h.t = e
c.q = b
c.y = b
c.x = e
j.t = b
j.z = b
j.u = a
j.p = e
j.x = e
j.s = l
assert h.t.z.t.y.q.o.txt == "
class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

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

b.o = e
b.s = g
g.q = b
g.y = b
g.x = e
e.s = b
e.t = b
e.q = h
e.z = a
e.y = c
a.t = e
l.x = f
l.t = f
l.q = a
f.t = b
f.z = b
f.u = a
f.p = e
f.x = e
f.s = l
h.t = e
c.q = b
c.y = b
c.x = e
j.t = b
j.z = b
j.u = a
j.p = e
j.x = e
j.s = l
assert h.t.z.t.y.q.o.txt == "e"