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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: F = None
        self.x: E = None
        self.y: F = None
        self.p: D = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: F = None
        self.x: E = None
        self.y: F = None
        self.p: D = None
        self.txt = txt

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

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

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

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

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