class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: I = None
        self.w: H = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: E = None
        self.w: C = None
        self.u: H = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: A = None
        self.u: I = None
        self.z: F = None
        self.r: C = None
        self.o: A = None
        self.w: H = None
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: G = None
        self.w: H = None
        self.v: G = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: I = None
        self.w: H = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: E = None
        self.w: C = None
        self.u: H = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: A = None
        self.u: I = None
        self.z: F = None
        self.r: C = None
        self.o: A = None
        self.w: H = None
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: G = None
        self.w: H = None
        self.v: G = None
        self.txt = txt

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

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

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

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

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