class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: F = None
        self.p: E = None
        self.y: J = None
        self.v: C = None
        self.o: B = None
        self.s: J = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: D = None
        self.x: E = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: H = None
        self.o: C = None
        self.u: C = None
        self.t: J = None
        self.z: F = None
        self.w: F = None
        self.s: F = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: I = None
        self.p: G = None
        self.u: I = None
        self.r: I = None
        self.v: G = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: G = None
        self.w: C = None
        self.z: E = None
        self.v: G = None
        self.u: C = None
        self.o: C = None
        self.y: G = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: J = None
        self.s: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: G = None
        self.q: D = None
        self.w: H = None
        self.y: G = None
        self.p: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: D = None
        self.x: E = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: H = None
        self.o: C = None
        self.u: C = None
        self.t: J = None
        self.z: F = None
        self.w: F = None
        self.s: F = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: I = None
        self.p: G = None
        self.u: I = None
        self.r: I = None
        self.v: G = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: G = None
        self.w: C = None
        self.z: E = None
        self.v: G = None
        self.u: C = None
        self.o: C = None
        self.y: G = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: J = None
        self.s: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: G = None
        self.q: D = None
        self.w: H = None
        self.y: G = None
        self.p: E = None
        self.txt = txt

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

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

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