class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: J = None
        self.u: C = None
        self.v: D = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: A = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: F = None
        self.w: B = None
        self.u: D = None
        self.y: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: A = None
        self.w: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: C = None
        self.o: I = None
        self.t: E = None
        self.p: A = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: B = None
        self.t: D = None
        self.o: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: A = None
        self.w: E = None
        self.y: A = None
        self.r: G = None
        self.z: D = None
        self.p: I = None
        self.v: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: A = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: F = None
        self.w: B = None
        self.u: D = None
        self.y: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: A = None
        self.w: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: C = None
        self.o: I = None
        self.t: E = None
        self.p: A = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: B = None
        self.t: D = None
        self.o: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: A = None
        self.w: E = None
        self.y: A = None
        self.r: G = None
        self.z: D = None
        self.p: I = None
        self.v: D = None
        self.txt = txt

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

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