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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: A = None
        self.z: F = None
        self.u: C = None
        self.o: D = None
        self.q: F = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: E = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: A = None
        self.z: F = None
        self.u: C = None
        self.o: D = None
        self.q: F = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: E = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

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