class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: I = None
        self.z: E = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: D = None
        self.y: G = None
        self.q: C = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: D = None
        self.w: D = None
        self.u: I = None
        self.x: D = None
        self.r: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: D = None
        self.y: G = None
        self.q: C = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: D = None
        self.w: D = None
        self.u: I = None
        self.x: D = None
        self.r: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: D = None
        self.txt = txt

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

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

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