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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: D = None
        self.q: G = None
        self.z: A = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: F = None
        self.p: D = None
        self.r: F = None
        self.v: I = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: D = None
        self.p: C = None
        self.u: A = None
        self.v: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: I = None
        self.r: D = None
        self.x: C = None
        self.p: I = None
        self.t: A = None
        self.v: D = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: D = None
        self.q: G = None
        self.z: A = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: F = None
        self.p: D = None
        self.r: F = None
        self.v: I = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: D = None
        self.p: C = None
        self.u: A = None
        self.v: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: I = None
        self.r: D = None
        self.x: C = None
        self.p: I = None
        self.t: A = None
        self.v: D = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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