class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: G = None
        self.v: G = None
        self.s: I = None
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: C = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: G = None
        self.p: A = None
        self.q: A = None
        self.u: H = None
        self.y: H = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: E = None
        self.o: F = None
        self.s: B = None
        self.z: F = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: I = None
        self.p: E = None
        self.y: F = None
        self.w: F = None
        self.s: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: E = None
        self.s: A = None
        self.o: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: C = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: G = None
        self.p: A = None
        self.q: A = None
        self.u: H = None
        self.y: H = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: E = None
        self.o: F = None
        self.s: B = None
        self.z: F = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: I = None
        self.p: E = None
        self.y: F = None
        self.w: F = None
        self.s: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: E = None
        self.s: A = None
        self.o: B = None
        self.txt = txt

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

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