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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: C = None
        self.r: E = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: F = None
        self.w: A = None
        self.v: C = None
        self.r: B = None
        self.u: F = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: C = None
        self.r: E = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: F = None
        self.w: A = None
        self.v: C = None
        self.r: B = None
        self.u: F = None
        self.x: A = None
        self.txt = txt

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

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