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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: F = None
        self.x: D = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: D = None
        self.s: A = None
        self.y: F = None
        self.t: B = None
        self.w: D = None
        self.txt = txt

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

l.r = n
l.x = n
l.z = e
l.o = m
m.y = b
j.z = i
j.s = m
j.q = m
j.y = g
g.q = m
c.y = j
c.w = n
c.x = g
c.q = i
n.r = j
n.p = g
n.w = g
n.s = l
n.y = b
n.t = m
b.r = j
b.p = g
b.w = g
b.s = l
b.y = n
b.t = m
e.z = i
e.s = m
e.q = m
e.y = g
i.z = e
i.s = m
i.q = m
i.y = g
assert i.q.y.s.z.z.y.q.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: C = None
        self.x: F = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: F = None
        self.x: D = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: D = None
        self.s: A = None
        self.y: F = None
        self.t: B = None
        self.w: D = None
        self.txt = txt

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

l.r = n
l.x = n
l.z = e
l.o = m
m.y = b
j.z = i
j.s = m
j.q = m
j.y = g
g.q = m
c.y = j
c.w = n
c.x = g
c.q = i
n.r = j
n.p = g
n.w = g
n.s = l
n.y = b
n.t = m
b.r = j
b.p = g
b.w = g
b.s = l
b.y = n
b.t = m
e.z = i
e.s = m
e.q = m
e.y = g
i.z = e
i.s = m
i.q = m
i.y = g
assert i.q.y.s.z.z.y.q.y.y.txt == "n"