class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: B = None
        self.u: E = None
        self.y: D = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

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

l.w = c
l.u = c
l.t = k
l.y = f
l.p = g
g.s = c
h.s = i
h.z = d
f.u = i
c.z = a
c.v = i
i.p = c
i.v = c
i.z = g
a.u = i
d.s = i
d.z = j
k.s = c
j.s = i
j.z = h
assert h.z.z.z.z.s.v.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: B = None
        self.u: E = None
        self.y: D = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

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

l.w = c
l.u = c
l.t = k
l.y = f
l.p = g
g.s = c
h.s = i
h.z = d
f.u = i
c.z = a
c.v = i
i.p = c
i.v = c
i.z = g
a.u = i
d.s = i
d.z = j
k.s = c
j.s = i
j.z = h
assert h.z.z.z.z.s.v.txt == "c"