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

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: A = None
        self.o: B = None
        self.q: C = None
        self.w: A = None
        self.u: F = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: G = None
        self.t: G = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: A = None
        self.o: B = None
        self.q: C = None
        self.w: A = None
        self.u: F = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: G = None
        self.t: G = None
        self.p: A = None
        self.txt = txt

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

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

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

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