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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: E = None
        self.t: H = None
        self.q: B = None
        self.p: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: B = None
        self.o: C = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: F = None
        self.t: E = None
        self.u: H = None
        self.q: F = None
        self.w: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: E = None
        self.t: H = None
        self.q: B = None
        self.p: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: B = None
        self.o: C = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: F = None
        self.t: E = None
        self.u: H = None
        self.q: F = None
        self.w: F = None
        self.txt = txt

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

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

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