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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: F = None
        self.p: B = None
        self.x: E = None
        self.q: B = None
        self.r: D = None
        self.txt = txt

h = A("h")
f = B("f")
e = C("e")
j = D("j")
k = E("k")
d = F("d")
n = G("n")
l = C("l")
i = F("i")

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: F = None
        self.p: B = None
        self.x: E = None
        self.q: B = None
        self.r: D = None
        self.txt = txt

h = A("h")
f = B("f")
e = C("e")
j = D("j")
k = E("k")
d = F("d")
n = G("n")
l = C("l")
i = F("i")

h.q = j
h.p = j
h.z = e
h.v = n
h.s = k
h.y = k
h.t = f
f.v = j
e.t = d
e.r = n
e.v = f
j.v = f
k.o = j
k.y = j
k.x = j
k.t = l
k.u = h
k.p = d
d.z = l
d.y = l
d.p = n
d.t = n
d.o = k
n.w = e
n.t = i
n.p = f
n.q = f
n.x = k
n.r = j
l.t = d
l.r = n
l.v = f
i.z = l
i.y = l
i.p = n
i.t = n
i.o = k
assert n.w.t.o.txt == "k"