class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: C = None
        self.u: H = None
        self.y: G = None
        self.p: E = None
        self.q: C = None
        self.t: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: C = None
        self.txt = txt

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

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

i = A("i")
c = B("c")
e = C("e")
d = D("d")
k = E("k")
n = F("n")
m = G("m")
b = H("b")

i.r = e
i.z = e
i.q = e
i.u = b
i.y = m
i.t = m
i.p = k
c.o = b
c.p = b
c.t = i
c.x = m
c.r = e
c.y = n
e.p = d
d.v = m
k.y = i
n.p = m
n.r = e
m.q = c
m.r = c
m.o = k
m.v = k
m.s = e
m.y = d
m.u = i
b.u = e
b.t = i
assert k.y.u.u.p.v.s.p.v.txt == "
class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: C = None
        self.u: H = None
        self.y: G = None
        self.p: E = None
        self.q: C = None
        self.t: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: C = None
        self.txt = txt

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

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

i = A("i")
c = B("c")
e = C("e")
d = D("d")
k = E("k")
n = F("n")
m = G("m")
b = H("b")

i.r = e
i.z = e
i.q = e
i.u = b
i.y = m
i.t = m
i.p = k
c.o = b
c.p = b
c.t = i
c.x = m
c.r = e
c.y = n
e.p = d
d.v = m
k.y = i
n.p = m
n.r = e
m.q = c
m.r = c
m.o = k
m.v = k
m.s = e
m.y = d
m.u = i
b.u = e
b.t = i
assert k.y.u.u.p.v.s.p.v.txt == "m"