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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: F = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: A = None
        self.p: A = None
        self.u: B = None
        self.w: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: D = None
        self.z: A = None
        self.q: A = None
        self.o: A = None
        self.u: D = None
        self.y: D = None
        self.x: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: F = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: A = None
        self.p: A = None
        self.u: B = None
        self.w: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: D = None
        self.z: A = None
        self.q: A = None
        self.o: A = None
        self.u: D = None
        self.y: D = None
        self.x: C = None
        self.txt = txt

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

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