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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: I = None
        self.r: G = None
        self.z: E = None
        self.o: I = None
        self.x: C = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: B = None
        self.z: A = None
        self.s: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: E = None
        self.w: F = None
        self.p: C = None
        self.u: B = None
        self.r: A = None
        self.q: F = None
        self.v: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: I = None
        self.r: G = None
        self.z: E = None
        self.o: I = None
        self.x: C = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: B = None
        self.z: A = None
        self.s: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: E = None
        self.w: F = None
        self.p: C = None
        self.u: B = None
        self.r: A = None
        self.q: F = None
        self.v: A = None
        self.txt = txt

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

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