class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: D = None
        self.w: D = None
        self.v: F = None
        self.z: D = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: F = None
        self.x: F = None
        self.q: E = None
        self.u: E = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: D = None
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: C = None
        self.x: A = None
        self.w: B = None
        self.o: A = None
        self.r: A = None
        self.txt = txt

l = A("l")
h = B("h")
m = C("m")
e = D("e")
k = E("k")
n = F("n")
i = B("i")

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: F = None
        self.x: F = None
        self.q: E = None
        self.u: E = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: D = None
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: C = None
        self.x: A = None
        self.w: B = None
        self.o: A = None
        self.r: A = None
        self.txt = txt

l = A("l")
h = B("h")
m = C("m")
e = D("e")
k = E("k")
n = F("n")
i = B("i")

l.r = h
l.q = e
l.w = e
l.z = e
l.v = n
l.s = n
h.z = l
h.w = l
h.o = n
h.x = n
h.q = k
h.u = k
m.v = l
m.z = l
m.w = e
e.y = n
e.p = n
k.q = e
k.w = m
n.u = i
n.s = m
n.x = l
n.o = l
n.r = l
n.w = h
i.z = l
i.w = l
i.o = n
i.x = n
i.q = k
i.u = k
assert e.p.u.q.q.p.u.txt == "i"