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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: E = None
        self.x: D = None
        self.t: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: A = None
        self.p: A = None
        self.z: C = None
        self.q: E = None
        self.txt = txt

g = A("g")
l = B("l")
f = C("f")
a = D("a")
m = E("m")
e = F("e")
i = F("i")
k = A("k")

g.q = a
l.t = f
l.z = f
l.r = i
l.p = m
f.u = a
f.x = a
f.t = a
f.o = m
a.v = m
a.z = m
a.w = m
a.x = l
a.u = i
m.v = f
m.w = f
m.x = a
m.q = a
m.z = k
e.w = l
e.t = k
e.p = k
e.z = f
e.q = m
i.w = l
i.t = k
i.p = k
i.z = f
i.q = m
k.q = a
assert k.q.w.v.o.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: E = None
        self.x: D = None
        self.t: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: A = None
        self.p: A = None
        self.z: C = None
        self.q: E = None
        self.txt = txt

g = A("g")
l = B("l")
f = C("f")
a = D("a")
m = E("m")
e = F("e")
i = F("i")
k = A("k")

g.q = a
l.t = f
l.z = f
l.r = i
l.p = m
f.u = a
f.x = a
f.t = a
f.o = m
a.v = m
a.z = m
a.w = m
a.x = l
a.u = i
m.v = f
m.w = f
m.x = a
m.q = a
m.z = k
e.w = l
e.t = k
e.p = k
e.z = f
e.q = m
i.w = l
i.t = k
i.p = k
i.z = f
i.q = m
k.q = a
assert k.q.w.v.o.txt == "m"