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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: F = None
        self.p: H = None
        self.x: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: D = None
        self.t: I = None
        self.s: D = None
        self.u: C = None
        self.y: I = None
        self.q: F = None
        self.w: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: E = None
        self.u: B = None
        self.x: B = None
        self.y: G = None
        self.s: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: F = None
        self.p: H = None
        self.x: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: D = None
        self.t: I = None
        self.s: D = None
        self.u: C = None
        self.y: I = None
        self.q: F = None
        self.w: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: E = None
        self.u: B = None
        self.x: B = None
        self.y: G = None
        self.s: B = None
        self.txt = txt

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

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