class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: C = None
        self.y: F = None
        self.u: E = None
        self.z: E = None
        self.o: C = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: G = None
        self.q: D = None
        self.x: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: C = None
        self.s: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: C = None
        self.y: F = None
        self.u: E = None
        self.z: E = None
        self.o: C = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: G = None
        self.q: D = None
        self.x: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: C = None
        self.s: E = None
        self.txt = txt

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

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