class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: I = None
        self.r: I = None
        self.p: F = None
        self.u: D = None
        self.o: H = None
        self.v: H = None
        self.s: B = None
        self.q: I = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: A = None
        self.r: A = None
        self.x: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: F = None
        self.r: J = None
        self.y: A = None
        self.z: B = None
        self.p: B = None
        self.t: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: A = None
        self.r: A = None
        self.x: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: F = None
        self.r: J = None
        self.y: A = None
        self.z: B = None
        self.p: B = None
        self.t: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

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

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