class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: E = None
        self.x: G = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: A = None
        self.t: D = None
        self.q: I = None
        self.y: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: I = None
        self.q: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: H = None
        self.q: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: A = None
        self.t: D = None
        self.q: I = None
        self.y: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: I = None
        self.q: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: H = None
        self.q: G = None
        self.txt = txt

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

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