class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: C = None
        self.v: F = None
        self.x: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: G = None
        self.x: A = None
        self.p: F = None
        self.w: F = None
        self.q: B = None
        self.u: D = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: A = None
        self.x: F = None
        self.r: E = None
        self.s: H = None
        self.v: C = None
        self.txt = txt

i = A("i")
k = B("k")
a = C("a")
f = D("f")
j = E("j")
n = F("n")
e = G("e")
m = H("m")
d = I("d")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: C = None
        self.v: F = None
        self.x: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: G = None
        self.x: A = None
        self.p: F = None
        self.w: F = None
        self.q: B = None
        self.u: D = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: A = None
        self.x: F = None
        self.r: E = None
        self.s: H = None
        self.v: C = None
        self.txt = txt

i = A("i")
k = B("k")
a = C("a")
f = D("f")
j = E("j")
n = F("n")
e = G("e")
m = H("m")
d = I("d")

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