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

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: H = None
        self.y: B = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: H = None
        self.p: D = None
        self.x: E = None
        self.y: B = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: I = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: E = None
        self.p: B = None
        self.v: E = None
        self.o: A = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: F = None
        self.s: D = None
        self.v: G = None
        self.x: G = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: E = None
        self.r: G = None
        self.z: D = None
        self.v: G = None
        self.q: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: H = None
        self.y: B = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: H = None
        self.p: D = None
        self.x: E = None
        self.y: B = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: I = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: E = None
        self.p: B = None
        self.v: E = None
        self.o: A = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: F = None
        self.s: D = None
        self.v: G = None
        self.x: G = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: E = None
        self.r: G = None
        self.z: D = None
        self.v: G = None
        self.q: C = None
        self.txt = txt

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

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