class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: F = None
        self.z: B = None
        self.y: B = None
        self.o: C = None
        self.v: F = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: B = None
        self.s: D = None
        self.v: B = None
        self.w: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: G = None
        self.v: G = None
        self.r: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: B = None
        self.s: D = None
        self.v: B = None
        self.w: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: G = None
        self.v: G = None
        self.r: D = None
        self.txt = txt

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

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

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

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