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

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: D = None
        self.t: E = None
        self.u: H = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: A = None
        self.v: F = None
        self.x: J = None
        self.y: F = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: H = None
        self.y: A = None
        self.o: J = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: J = None
        self.x: G = None
        self.o: I = None
        self.q: I = None
        self.u: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: H = None
        self.p: B = None
        self.x: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: D = None
        self.t: E = None
        self.u: H = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: A = None
        self.v: F = None
        self.x: J = None
        self.y: F = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: H = None
        self.y: A = None
        self.o: J = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: J = None
        self.x: G = None
        self.o: I = None
        self.q: I = None
        self.u: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: H = None
        self.p: B = None
        self.x: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

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