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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: D = None
        self.z: A = None
        self.x: G = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: H = None
        self.r: D = None
        self.w: H = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: C = None
        self.q: B = None
        self.v: D = None
        self.s: B = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: B = None
        self.y: B = None
        self.s: G = None
        self.q: C = None
        self.x: I = None
        self.t: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: D = None
        self.z: A = None
        self.x: G = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: H = None
        self.r: D = None
        self.w: H = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: C = None
        self.q: B = None
        self.v: D = None
        self.s: B = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: B = None
        self.y: B = None
        self.s: G = None
        self.q: C = None
        self.x: I = None
        self.t: E = None
        self.txt = txt

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

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

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