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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

i = A("i")
a = B("a")
b = C("b")
c = D("c")
h = E("h")
j = F("j")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

i = A("i")
a = B("a")
b = C("b")
c = D("c")
h = E("h")
j = F("j")

i.z = b
i.p = a
a.u = b
a.x = i
a.o = c
a.r = c
a.q = h
b.y = j
b.s = j
b.u = i
b.z = i
b.p = h
c.q = i
h.v = b
j.t = a
j.q = h
j.v = c
j.p = c
j.u = b
assert c.q.z.u.z.y.t.txt == "a"