class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: H = None
        self.u: G = None
        self.z: E = None
        self.q: G = None
        self.x: H = None
        self.t: E = None
        self.s: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: G = None
        self.r: F = None
        self.s: A = None
        self.x: H = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: A = None
        self.w: H = None
        self.o: D = None
        self.z: C = None
        self.q: D = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: D = None
        self.v: E = None
        self.w: C = None
        self.u: A = None
        self.p: C = None
        self.s: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

a.o = b
a.r = b
a.x = b
a.u = d
a.q = d
a.z = k
a.t = k
a.s = l
c.s = e
c.u = e
c.w = d
c.y = l
j.z = l
j.w = a
l.t = k
l.v = k
l.p = d
l.r = e
l.s = a
l.x = b
k.y = c
k.p = a
k.w = b
k.o = l
k.q = l
k.z = j
k.s = e
e.x = j
e.w = j
e.p = j
e.s = j
e.o = l
e.v = k
e.u = a
d.w = j
d.x = j
d.t = a
d.r = a
d.v = a
d.p = e
b.t = l
assert j.z.r.o.s.s.x.t.p.txt == "
class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: H = None
        self.u: G = None
        self.z: E = None
        self.q: G = None
        self.x: H = None
        self.t: E = None
        self.s: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: G = None
        self.r: F = None
        self.s: A = None
        self.x: H = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: A = None
        self.w: H = None
        self.o: D = None
        self.z: C = None
        self.q: D = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: D = None
        self.v: E = None
        self.w: C = None
        self.u: A = None
        self.p: C = None
        self.s: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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