class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: B = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: J = None
        self.y: J = None
        self.w: G = None
        self.z: I = None
        self.p: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: F = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: J = None
        self.y: J = None
        self.w: G = None
        self.z: I = None
        self.p: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: F = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

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