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

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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