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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: A = None
        self.r: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: I = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: H = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: C = None
        self.z: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: D = None
        self.r: C = None
        self.v: D = None
        self.p: C = None
        self.s: B = None
        self.x: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: A = None
        self.r: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: I = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: H = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: C = None
        self.z: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: D = None
        self.r: C = None
        self.v: D = None
        self.p: C = None
        self.s: B = None
        self.x: F = None
        self.txt = txt

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

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