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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: C = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: D = None
        self.z: J = None
        self.s: D = None
        self.r: G = None
        self.q: G = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: C = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: D = None
        self.z: J = None
        self.s: D = None
        self.r: G = None
        self.q: G = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: G = None
        self.txt = txt

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

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

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