class A:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: B = None
        self.w: C = None
        self.z: H = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: G = None
        self.y: E = None
        self.o: H = None
        self.p: B = None
        self.x: J = None
        self.v: A = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: E = None
        self.q: F = None
        self.o: A = None
        self.r: J = None
        self.w: I = None
        self.s: F = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: G = None
        self.r: F = None
        self.u: G = None
        self.w: F = None
        self.q: A = None
        self.x: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: G = None
        self.y: E = None
        self.o: H = None
        self.p: B = None
        self.x: J = None
        self.v: A = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: E = None
        self.q: F = None
        self.o: A = None
        self.r: J = None
        self.w: I = None
        self.s: F = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: G = None
        self.r: F = None
        self.u: G = None
        self.w: F = None
        self.q: A = None
        self.x: D = None
        self.txt = txt

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

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

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

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