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

class B:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: A = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: D = None
        self.v: B = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: F = None
        self.z: C = None
        self.r: C = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: G = None
        self.q: G = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: A = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: D = None
        self.v: B = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: F = None
        self.z: C = None
        self.r: C = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: G = None
        self.q: G = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: D = None
        self.txt = txt

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

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