class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: D = None
        self.z: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: H = None
        self.t: I = None
        self.q: H = None
        self.p: F = None
        self.z: A = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: C = None
        self.w: F = None
        self.x: C = None
        self.r: E = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: D = None
        self.z: G = None
        self.y: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: D = None
        self.z: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: H = None
        self.t: I = None
        self.q: H = None
        self.p: F = None
        self.z: A = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: C = None
        self.w: F = None
        self.x: C = None
        self.r: E = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: D = None
        self.z: G = None
        self.y: G = None
        self.txt = txt

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

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

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