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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: A = None
        self.t: F = None
        self.o: G = None
        self.y: F = None
        self.v: D = None
        self.p: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: B = None
        self.s: D = None
        self.w: D = None
        self.t: D = None
        self.y: B = None
        self.r: E = None
        self.o: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

l = A("l")
j = B("j")
a = C("a")
b = D("b")
d = E("d")
c = F("c")
f = G("f")
n = H("n")

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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: A = None
        self.t: F = None
        self.o: G = None
        self.y: F = None
        self.v: D = None
        self.p: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: B = None
        self.s: D = None
        self.w: D = None
        self.t: D = None
        self.y: B = None
        self.r: E = None
        self.o: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

l = A("l")
j = B("j")
a = C("a")
b = D("b")
d = E("d")
c = F("c")
f = G("f")
n = H("n")

l.r = j
l.o = a
j.w = l
j.t = b
a.x = f
a.o = f
a.u = l
a.t = c
a.y = c
a.v = b
a.p = n
b.x = a
d.t = j
d.z = n
d.w = n
d.y = l
d.r = a
d.v = f
c.z = f
c.u = j
c.y = j
c.s = b
c.w = b
c.t = b
c.r = d
c.o = n
f.v = c
f.t = c
f.r = a
f.x = n
f.u = j
n.x = c
assert n.x.r.t.t.x.u.r.txt == "j"