class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: B = None
        self.x: F = None
        self.v: B = None
        self.u: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: J = None
        self.u: H = None
        self.r: D = None
        self.o: F = None
        self.p: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: E = None
        self.y: G = None
        self.v: J = None
        self.t: G = None
        self.z: D = None
        self.r: F = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: J = None
        self.u: H = None
        self.r: D = None
        self.o: F = None
        self.p: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: E = None
        self.y: G = None
        self.v: J = None
        self.t: G = None
        self.z: D = None
        self.r: F = None
        self.p: C = None
        self.txt = txt

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

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

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

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