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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: C = None
        self.q: E = None
        self.y: D = None
        self.w: G = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: G = None
        self.u: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: C = None
        self.q: E = None
        self.y: D = None
        self.w: G = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: G = None
        self.u: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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