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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: B = None
        self.t: A = None
        self.o: G = None
        self.x: B = None
        self.txt = txt

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

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

d = A("d")
e = B("e")
k = C("k")
n = D("n")
c = E("c")
g = F("g")
f = G("f")
i = F("i")
l = E("l")
j = B("j")

d.u = k
e.t = k
e.x = k
e.p = k
e.z = k
e.y = i
e.q = l
e.v = d
k.t = j
n.t = k
n.u = e
c.s = l
c.w = j
c.t = d
c.o = f
c.x = e
g.t = k
g.v = k
g.o = k
g.u = f
g.q = l
f.z = k
i.t = k
i.v = k
i.o = k
i.u = f
i.q = c
l.s = c
l.w = e
l.x = e
l.t = d
l.o = f
j.t = k
j.x = k
j.p = k
j.z = k
j.y = i
j.q = c
j.v = d
assert k.t.q.w.z.t.z.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: B = None
        self.t: A = None
        self.o: G = None
        self.x: B = None
        self.txt = txt

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

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

d = A("d")
e = B("e")
k = C("k")
n = D("n")
c = E("c")
g = F("g")
f = G("f")
i = F("i")
l = E("l")
j = B("j")

d.u = k
e.t = k
e.x = k
e.p = k
e.z = k
e.y = i
e.q = l
e.v = d
k.t = j
n.t = k
n.u = e
c.s = l
c.w = j
c.t = d
c.o = f
c.x = e
g.t = k
g.v = k
g.o = k
g.u = f
g.q = l
f.z = k
i.t = k
i.v = k
i.o = k
i.u = f
i.q = c
l.s = c
l.w = e
l.x = e
l.t = d
l.o = f
j.t = k
j.x = k
j.p = k
j.z = k
j.y = i
j.q = c
j.v = d
assert k.t.q.w.z.t.z.txt == "k"