class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: B = None
        self.r: E = None
        self.q: D = None
        self.s: D = None
        self.z: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: A = None
        self.t: F = None
        self.w: E = None
        self.u: D = None
        self.s: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: C = None
        self.z: D = None
        self.r: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: A = None
        self.t: F = None
        self.w: E = None
        self.u: D = None
        self.s: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: C = None
        self.z: D = None
        self.r: B = None
        self.txt = txt

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

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

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