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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: I = None
        self.w: E = None
        self.s: I = None
        self.t: H = None
        self.u: D = None
        self.p: I = None
        self.y: I = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: C = None
        self.r: B = None
        self.o: D = None
        self.z: G = None
        self.s: A = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: A = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: B = None
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

k = A("k")
e = B("e")
d = C("d")
m = D("m")
f = E("f")
h = F("h")
c = G("c")
j = H("j")
l = I("l")

k.v = h
k.p = c
k.w = c
k.x = j
k.y = j
e.z = l
e.w = l
e.t = l
e.r = k
d.x = c
d.r = c
d.z = l
d.s = l
d.p = l
d.y = l
d.w = f
d.t = j
d.u = m
m.y = d
m.r = f
f.y = m
f.o = m
f.w = d
f.r = e
f.z = c
f.s = k
f.u = l
h.t = k
h.x = k
h.p = l
c.u = l
j.z = f
j.y = e
j.w = h
l.z = f
assert l.z.w.x.u.z.w.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: G = None
        self.x: H = None
        self.w: G = None
        self.y: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: I = None
        self.w: E = None
        self.s: I = None
        self.t: H = None
        self.u: D = None
        self.p: I = None
        self.y: I = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: C = None
        self.r: B = None
        self.o: D = None
        self.z: G = None
        self.s: A = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: A = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: B = None
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

k = A("k")
e = B("e")
d = C("d")
m = D("m")
f = E("f")
h = F("h")
c = G("c")
j = H("j")
l = I("l")

k.v = h
k.p = c
k.w = c
k.x = j
k.y = j
e.z = l
e.w = l
e.t = l
e.r = k
d.x = c
d.r = c
d.z = l
d.s = l
d.p = l
d.y = l
d.w = f
d.t = j
d.u = m
m.y = d
m.r = f
f.y = m
f.o = m
f.w = d
f.r = e
f.z = c
f.s = k
f.u = l
h.t = k
h.x = k
h.p = l
c.u = l
j.z = f
j.y = e
j.w = h
l.z = f
assert l.z.w.x.u.z.w.z.z.txt == "f"