class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: C = None
        self.r: B = None
        self.s: D = None
        self.u: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: D = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: D = None
        self.q: E = None
        self.txt = txt

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

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

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