class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: B = None
        self.w: F = None
        self.u: G = None
        self.s: I = None
        self.z: C = None
        self.y: D = None
        self.v: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: D = None
        self.w: F = None
        self.x: C = None
        self.r: F = None
        self.q: B = None
        self.v: B = None
        self.s: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: D = None
        self.y: I = None
        self.s: I = None
        self.w: J = None
        self.q: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: G = None
        self.r: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: D = None
        self.w: F = None
        self.x: C = None
        self.r: F = None
        self.q: B = None
        self.v: B = None
        self.s: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: D = None
        self.y: I = None
        self.s: I = None
        self.w: J = None
        self.q: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: G = None
        self.r: D = None
        self.txt = txt

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

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