class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: E = None
        self.v: B = None
        self.u: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: E = None
        self.r: F = None
        self.t: H = None
        self.q: A = None
        self.w: I = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: B = None
        self.z: C = None
        self.v: J = None
        self.p: B = None
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: J = None
        self.u: G = None
        self.t: G = None
        self.p: F = None
        self.z: F = None
        self.v: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: G = None
        self.t: J = None
        self.y: J = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: E = None
        self.r: F = None
        self.t: H = None
        self.q: A = None
        self.w: I = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: B = None
        self.z: C = None
        self.v: J = None
        self.p: B = None
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: J = None
        self.u: G = None
        self.t: G = None
        self.p: F = None
        self.z: F = None
        self.v: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: G = None
        self.t: J = None
        self.y: J = None
        self.txt = txt

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

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

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

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