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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: C = None
        self.p: A = None
        self.z: E = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: I = None
        self.z: D = None
        self.t: B = None
        self.p: G = None
        self.u: G = None
        self.s: B = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: H = None
        self.w: F = None
        self.s: B = None
        self.x: G = None
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: C = None
        self.p: A = None
        self.z: E = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: I = None
        self.z: D = None
        self.t: B = None
        self.p: G = None
        self.u: G = None
        self.s: B = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: H = None
        self.w: F = None
        self.s: B = None
        self.x: G = None
        self.r: D = None
        self.txt = txt

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

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