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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: F = None
        self.q: G = None
        self.v: F = None
        self.t: I = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: G = None
        self.z: E = None
        self.t: J = None
        self.p: B = None
        self.v: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: A = None
        self.q: C = None
        self.w: F = None
        self.u: G = None
        self.p: A = None
        self.t: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: F = None
        self.q: G = None
        self.v: F = None
        self.t: I = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: G = None
        self.z: E = None
        self.t: J = None
        self.p: B = None
        self.v: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: A = None
        self.q: C = None
        self.w: F = None
        self.u: G = None
        self.p: A = None
        self.t: A = None
        self.txt = txt

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

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