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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: D = None
        self.r: A = None
        self.p: F = None
        self.z: G = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: H = None
        self.q: A = None
        self.u: G = None
        self.z: C = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: D = None
        self.x: A = None
        self.z: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: D = None
        self.r: A = None
        self.p: F = None
        self.z: G = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: H = None
        self.q: A = None
        self.u: G = None
        self.z: C = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: D = None
        self.x: A = None
        self.z: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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