class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: C = None
        self.o: H = None
        self.v: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: H = None
        self.y: I = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: A = None
        self.o: D = None
        self.v: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: F = None
        self.z: B = None
        self.t: F = None
        self.p: D = None
        self.w: I = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: H = None
        self.y: I = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: A = None
        self.o: D = None
        self.v: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: F = None
        self.z: B = None
        self.t: F = None
        self.p: D = None
        self.w: I = None
        self.txt = txt

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

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

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

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