class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: E = None
        self.z: F = None
        self.q: I = None
        self.o: E = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: I = None
        self.z: E = None
        self.p: F = None
        self.t: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: G = None
        self.o: C = None
        self.p: E = None
        self.y: D = None
        self.q: D = None
        self.z: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: C = None
        self.x: F = None
        self.v: B = None
        self.y: H = None
        self.q: F = None
        self.w: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: E = None
        self.z: F = None
        self.q: I = None
        self.o: E = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: I = None
        self.z: E = None
        self.p: F = None
        self.t: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: G = None
        self.o: C = None
        self.p: E = None
        self.y: D = None
        self.q: D = None
        self.z: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: C = None
        self.x: F = None
        self.v: B = None
        self.y: H = None
        self.q: F = None
        self.w: F = None
        self.txt = txt

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

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