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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: G = None
        self.o: F = None
        self.z: D = None
        self.p: A = None
        self.q: J = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: C = None
        self.z: F = None
        self.t: D = None
        self.o: J = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: G = None
        self.o: F = None
        self.z: D = None
        self.p: A = None
        self.q: J = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: C = None
        self.z: F = None
        self.t: D = None
        self.o: J = None
        self.x: C = None
        self.txt = txt

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

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

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

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