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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: A = None
        self.txt = txt

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

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