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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: B = None
        self.p: D = None
        self.w: C = None
        self.z: D = None
        self.o: B = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: B = None
        self.p: D = None
        self.w: C = None
        self.z: D = None
        self.o: B = None
        self.t: D = None
        self.txt = txt

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

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