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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: I = None
        self.u: I = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: D = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: D = None
        self.x: F = None
        self.q: F = None
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: C = None
        self.q: B = None
        self.y: E = None
        self.w: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: I = None
        self.u: I = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: D = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: D = None
        self.x: F = None
        self.q: F = None
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: C = None
        self.q: B = None
        self.y: E = None
        self.w: A = None
        self.txt = txt

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

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