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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

h.z = b
h.x = f
h.y = f
h.v = i
h.t = m
h.p = e
a.t = k
a.u = i
b.x = e
m.q = e
m.t = f
m.y = k
m.s = k
k.z = e
k.s = i
e.z = f
i.t = k
i.u = a
f.z = b
f.x = h
f.y = h
f.v = i
f.t = m
f.p = e
assert a.u.t.s.u.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: A = None
        self.v: B = None
        self.t: D = None
        self.p: F = None
        self.y: A = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

h.z = b
h.x = f
h.y = f
h.v = i
h.t = m
h.p = e
a.t = k
a.u = i
b.x = e
m.q = e
m.t = f
m.y = k
m.s = k
k.z = e
k.s = i
e.z = f
i.t = k
i.u = a
f.z = b
f.x = h
f.y = h
f.v = i
f.t = m
f.p = e
assert a.u.t.s.u.txt == "a"