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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: A = None
        self.t: A = None
        self.w: G = None
        self.p: B = None
        self.y: C = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: F = None
        self.q: I = None
        self.o: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: A = None
        self.t: A = None
        self.w: G = None
        self.p: B = None
        self.y: C = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: F = None
        self.q: I = None
        self.o: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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