class A:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: G = None
        self.r: C = None
        self.y: F = None
        self.s: F = None
        self.w: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: C = None
        self.p: F = None
        self.z: G = None
        self.y: F = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

m = A("m")
g = B("g")
h = C("h")
k = D("k")
d = E("d")
i = F("i")
e = G("e")
f = A("f")
a = B("a")
j = C("j")

m.z = f
m.q = e
m.r = h
m.y = i
m.s = i
m.w = i
g.q = d
h.q = k
k.q = a
k.s = i
k.p = j
d.w = i
d.p = i
d.y = i
d.q = h
d.z = e
d.v = e
i.v = j
i.s = g
e.t = i
f.z = m
f.q = e
f.r = h
f.y = i
f.s = i
f.w = i
a.q = d
j.q = k
assert g.q.q.q.p.txt == "
class A:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: G = None
        self.r: C = None
        self.y: F = None
        self.s: F = None
        self.w: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: C = None
        self.p: F = None
        self.z: G = None
        self.y: F = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

m = A("m")
g = B("g")
h = C("h")
k = D("k")
d = E("d")
i = F("i")
e = G("e")
f = A("f")
a = B("a")
j = C("j")

m.z = f
m.q = e
m.r = h
m.y = i
m.s = i
m.w = i
g.q = d
h.q = k
k.q = a
k.s = i
k.p = j
d.w = i
d.p = i
d.y = i
d.q = h
d.z = e
d.v = e
i.v = j
i.s = g
e.t = i
f.z = m
f.q = e
f.r = h
f.y = i
f.s = i
f.w = i
a.q = d
j.q = k
assert g.q.q.q.p.txt == "j"