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

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: H = None
        self.p: G = None
        self.q: H = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: H = None
        self.p: G = None
        self.q: H = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

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