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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

m = A("m")
g = B("g")
c = C("c")
f = D("f")
d = E("d")
l = F("l")
i = C("i")
n = B("n")
h = B("h")
k = B("k")

m.q = i
m.z = i
m.r = d
m.o = k
g.v = m
g.q = k
c.s = h
c.v = d
c.u = m
c.y = m
c.t = l
c.r = l
f.z = i
f.x = l
f.q = m
d.r = f
l.x = c
l.v = c
l.z = f
l.w = d
l.o = i
l.r = h
i.s = k
i.v = d
i.u = m
i.y = m
i.t = l
i.r = l
n.v = m
n.q = h
h.v = m
h.q = g
k.v = m
k.q = h
assert g.q.v.z.v.r.x.x.txt == "
class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: C = None
        self.r: E = None
        self.o: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

m = A("m")
g = B("g")
c = C("c")
f = D("f")
d = E("d")
l = F("l")
i = C("i")
n = B("n")
h = B("h")
k = B("k")

m.q = i
m.z = i
m.r = d
m.o = k
g.v = m
g.q = k
c.s = h
c.v = d
c.u = m
c.y = m
c.t = l
c.r = l
f.z = i
f.x = l
f.q = m
d.r = f
l.x = c
l.v = c
l.z = f
l.w = d
l.o = i
l.r = h
i.s = k
i.v = d
i.u = m
i.y = m
i.t = l
i.r = l
n.v = m
n.q = h
h.v = m
h.q = g
k.v = m
k.q = h
assert g.q.v.z.v.r.x.x.txt == "c"