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

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: F = None
        self.w: F = None
        self.x: A = None
        self.u: G = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: D = None
        self.o: H = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: D = None
        self.s: H = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: A = None
        self.p: F = None
        self.y: G = None
        self.u: F = None
        self.txt = txt

a = A("a")
g = B("g")
i = C("i")
l = D("l")
b = E("b")
j = F("j")
e = G("e")
k = H("k")

a.z = g
a.w = e
g.p = l
g.u = i
i.z = j
l.q = j
l.v = j
l.w = j
l.x = a
l.u = e
l.p = b
b.u = g
b.o = k
j.q = b
j.s = l
j.o = k
j.x = a
e.t = k
e.s = k
e.u = l
e.p = j
k.q = g
k.w = a
k.p = j
k.u = j
k.y = e
assert l.u.u.p.o.u.s.x.w.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: F = None
        self.w: F = None
        self.x: A = None
        self.u: G = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: D = None
        self.o: H = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: D = None
        self.s: H = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: A = None
        self.p: F = None
        self.y: G = None
        self.u: F = None
        self.txt = txt

a = A("a")
g = B("g")
i = C("i")
l = D("l")
b = E("b")
j = F("j")
e = G("e")
k = H("k")

a.z = g
a.w = e
g.p = l
g.u = i
i.z = j
l.q = j
l.v = j
l.w = j
l.x = a
l.u = e
l.p = b
b.u = g
b.o = k
j.q = b
j.s = l
j.o = k
j.x = a
e.t = k
e.s = k
e.u = l
e.p = j
k.q = g
k.w = a
k.p = j
k.u = j
k.y = e
assert l.u.u.p.o.u.s.x.w.txt == "e"