class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: F = None
        self.o: H = None
        self.r: J = None
        self.v: H = None
        self.t: C = None
        self.y: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: F = None
        self.y: A = None
        self.z: E = None
        self.u: H = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: F = None
        self.q: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: A = None
        self.w: A = None
        self.p: G = None
        self.y: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: J = None
        self.w: B = None
        self.z: C = None
        self.u: C = None
        self.q: F = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: F = None
        self.y: A = None
        self.z: E = None
        self.u: H = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: F = None
        self.q: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: A = None
        self.w: A = None
        self.p: G = None
        self.y: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: J = None
        self.w: B = None
        self.z: C = None
        self.u: C = None
        self.q: F = None
        self.s: C = None
        self.txt = txt

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

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

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