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

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

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: B = None
        self.u: G = None
        self.w: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: G = None
        self.p: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: H = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: I = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.x: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: B = None
        self.u: G = None
        self.w: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: G = None
        self.p: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: H = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: I = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.x: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

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

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