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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: B = None
        self.o: B = None
        self.w: B = None
        self.x: F = None
        self.y: G = None
        self.t: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: G = None
        self.r: G = None
        self.s: G = None
        self.q: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: B = None
        self.o: B = None
        self.w: B = None
        self.x: F = None
        self.y: G = None
        self.t: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: G = None
        self.r: G = None
        self.s: G = None
        self.q: B = None
        self.txt = txt

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

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

d.o = a
a.v = i
a.u = k
g.w = c
g.y = m
l.v = a
l.u = a
l.o = a
l.w = a
l.x = e
l.y = j
l.t = c
m.p = k
i.v = e
i.x = k
i.s = k
i.r = j
i.q = a
k.s = e
k.o = e
k.v = g
k.t = g
k.x = m
j.s = i
j.v = g
j.t = g
j.o = e
j.x = m
c.v = a
c.u = a
c.o = a
c.w = a
c.x = i
c.y = k
c.t = l
e.v = i
e.x = j
e.s = j
e.r = k
e.q = a
assert a.u.x.p.x.p.x.p.txt == "k"