class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: C = None
        self.y: E = None
        self.p: G = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: E = None
        self.y: A = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: A = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: E = None
        self.y: A = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: A = None
        self.u: D = None
        self.txt = txt

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

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