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

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

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: B = None
        self.x: A = None
        self.y: H = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: E = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: J = None
        self.s: A = None
        self.w: J = None
        self.z: A = None
        self.y: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: A = None
        self.v: A = None
        self.y: H = None
        self.s: G = None
        self.w: E = None
        self.z: H = None
        self.q: B = None
        self.o: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: B = None
        self.x: A = None
        self.y: H = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: E = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: J = None
        self.s: A = None
        self.w: J = None
        self.z: A = None
        self.y: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: A = None
        self.v: A = None
        self.y: H = None
        self.s: G = None
        self.w: E = None
        self.z: H = None
        self.q: B = None
        self.o: D = None
        self.txt = txt

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

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