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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: A = None
        self.u: B = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: B = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: C = None
        self.w: G = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: B = None
        self.x: A = None
        self.y: H = None
        self.txt = txt

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

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

d = A("d")
b = B("b")
h = C("h")
i = D("i")
f = E("f")
m = F("m")
c = G("c")
l = H("l")
j = A("j")
g = B("g")

d.r = m
d.u = j
d.t = j
b.z = m
b.w = f
b.y = c
b.t = h
b.x = l
b.v = i
h.t = b
h.u = b
h.x = b
h.s = j
i.y = h
i.o = g
i.s = m
f.p = c
f.w = c
f.t = h
f.z = i
m.t = d
m.r = b
m.x = j
m.y = l
c.x = l
l.t = f
l.s = f
l.y = d
l.x = d
l.u = i
l.v = m
l.o = h
l.r = c
j.r = m
j.u = d
j.t = d
g.z = m
g.w = f
g.y = c
g.t = h
g.x = l
g.v = i
assert l.u.y.x.t.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: A = None
        self.t: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: A = None
        self.u: B = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: B = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: C = None
        self.w: G = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: B = None
        self.x: A = None
        self.y: H = None
        self.txt = txt

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

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

d = A("d")
b = B("b")
h = C("h")
i = D("i")
f = E("f")
m = F("m")
c = G("c")
l = H("l")
j = A("j")
g = B("g")

d.r = m
d.u = j
d.t = j
b.z = m
b.w = f
b.y = c
b.t = h
b.x = l
b.v = i
h.t = b
h.u = b
h.x = b
h.s = j
i.y = h
i.o = g
i.s = m
f.p = c
f.w = c
f.t = h
f.z = i
m.t = d
m.r = b
m.x = j
m.y = l
c.x = l
l.t = f
l.s = f
l.y = d
l.x = d
l.u = i
l.v = m
l.o = h
l.r = c
j.r = m
j.u = d
j.t = d
g.z = m
g.w = f
g.y = c
g.t = h
g.x = l
g.v = i
assert l.u.y.x.t.txt == "h"