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

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: D = None
        self.p: F = None
        self.o: G = None
        self.u: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: F = None
        self.u: F = None
        self.w: B = None
        self.r: C = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: A = None
        self.o: C = None
        self.x: F = None
        self.w: B = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: G = None
        self.q: C = None
        self.s: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: D = None
        self.p: F = None
        self.o: G = None
        self.u: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: F = None
        self.u: F = None
        self.w: B = None
        self.r: C = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: A = None
        self.o: C = None
        self.x: F = None
        self.w: B = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: G = None
        self.q: C = None
        self.s: G = None
        self.txt = txt

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

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

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