class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: H = None
        self.s: E = None
        self.r: D = None
        self.u: F = None
        self.t: D = None
        self.p: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: E = None
        self.p: F = None
        self.r: E = None
        self.v: H = None
        self.y: F = None
        self.z: F = None
        self.t: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: E = None
        self.x: E = None
        self.w: E = None
        self.t: G = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: A = None
        self.w: E = None
        self.o: F = None
        self.x: E = None
        self.v: H = None
        self.txt = txt

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

n = A("n")
g = B("g")
m = C("m")
i = D("i")
f = E("f")
b = F("b")
a = G("a")
j = H("j")
h = H("h")

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: E = None
        self.p: F = None
        self.r: E = None
        self.v: H = None
        self.y: F = None
        self.z: F = None
        self.t: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: E = None
        self.x: E = None
        self.w: E = None
        self.t: G = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: A = None
        self.w: E = None
        self.o: F = None
        self.x: E = None
        self.v: H = None
        self.txt = txt

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

n = A("n")
g = B("g")
m = C("m")
i = D("i")
f = E("f")
b = F("b")
a = G("a")
j = H("j")
h = H("h")

n.v = f
n.s = f
n.q = h
n.r = i
n.t = i
n.p = i
n.u = b
g.x = m
g.y = i
g.s = h
m.x = g
m.w = f
m.r = f
m.t = f
m.p = b
m.y = b
m.z = b
m.v = h
i.r = b
i.s = m
f.o = b
f.t = a
b.r = a
b.t = a
b.s = f
b.x = f
b.w = f
b.p = n
a.y = i
a.t = n
a.w = f
a.x = f
a.o = b
a.v = h
j.z = n
j.q = n
j.p = i
j.o = i
h.z = n
h.q = n
h.p = i
h.o = i
assert m.x.x.z.r.y.txt == "i"