class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: F = None
        self.y: B = None
        self.z: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: G = None
        self.u: E = None
        self.x: C = None
        self.o: G = None
        self.w: A = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: G = None
        self.u: E = None
        self.x: C = None
        self.o: G = None
        self.w: A = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: G = None
        self.txt = txt

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

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