class A:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: A = None
        self.u: H = None
        self.t: G = None
        self.p: B = None
        self.x: C = None
        self.o: E = None
        self.q: I = None
        self.w: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: I = None
        self.p: D = None
        self.z: I = None
        self.s: G = None
        self.y: D = None
        self.q: B = None
        self.u: B = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: C = None
        self.s: B = None
        self.w: B = None
        self.x: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: I = None
        self.p: D = None
        self.z: I = None
        self.s: G = None
        self.y: D = None
        self.q: B = None
        self.u: B = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: C = None
        self.s: B = None
        self.w: B = None
        self.x: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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