class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: E = None
        self.r: F = None
        self.o: E = None
        self.p: B = None
        self.x: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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

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