class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: B = None
        self.o: I = None
        self.x: E = None
        self.z: D = None
        self.q: C = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: F = None
        self.y: E = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: I = None
        self.w: F = None
        self.r: J = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: J = None
        self.p: B = None
        self.o: G = None
        self.t: A = None
        self.q: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: J = None
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: H = None
        self.t: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: F = None
        self.y: E = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: I = None
        self.w: F = None
        self.r: J = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: J = None
        self.p: B = None
        self.o: G = None
        self.t: A = None
        self.q: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: J = None
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: H = None
        self.t: A = None
        self.txt = txt

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

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

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