class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: E = None
        self.q: G = None
        self.o: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: E = None
        self.u: F = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: F = None
        self.s: A = None
        self.v: F = None
        self.z: E = None
        self.q: D = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: E = None
        self.u: F = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: F = None
        self.s: A = None
        self.v: F = None
        self.z: E = None
        self.q: D = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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