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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: C = None
        self.x: G = None
        self.r: G = None
        self.z: B = None
        self.v: E = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: A = None
        self.v: A = None
        self.x: G = None
        self.t: J = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: I = None
        self.s: J = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: C = None
        self.x: G = None
        self.r: G = None
        self.z: B = None
        self.v: E = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: A = None
        self.v: A = None
        self.x: G = None
        self.t: J = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: I = None
        self.s: J = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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