class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

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

i.v = k
i.r = l
l.y = i
c.x = f
c.y = l
c.r = l
c.s = k
c.q = e
c.z = i
n.t = e
n.u = k
k.p = l
h.y = n
f.x = c
f.y = l
f.r = l
f.s = k
f.q = e
f.z = i
e.t = n
e.u = k
assert f.x.q.t.txt == "
class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

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

i.v = k
i.r = l
l.y = i
c.x = f
c.y = l
c.r = l
c.s = k
c.q = e
c.z = i
n.t = e
n.u = k
k.p = l
h.y = n
f.x = c
f.y = l
f.r = l
f.s = k
f.q = e
f.z = i
e.t = n
e.u = k
assert f.x.q.t.txt == "n"