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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: A = None
        self.q: F = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: D = None
        self.o: A = None
        self.u: E = None
        self.v: G = None
        self.txt = txt

c = A("c")
k = B("k")
h = C("h")
g = D("g")
e = E("e")
a = F("a")
d = G("d")
n = H("n")
i = C("i")
j = H("j")

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: A = None
        self.q: F = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: D = None
        self.o: A = None
        self.u: E = None
        self.v: G = None
        self.txt = txt

c = A("c")
k = B("k")
h = C("h")
g = D("g")
e = E("e")
a = F("a")
d = G("d")
n = H("n")
i = C("i")
j = H("j")

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