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

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: E = None
        self.q: A = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: E = None
        self.q: A = None
        self.s: G = None
        self.txt = txt

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

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

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

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