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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: H = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: F = None
        self.t: D = None
        self.u: A = None
        self.r: H = None
        self.v: I = None
        self.q: F = None
        self.x: B = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: I = None
        self.r: I = None
        self.x: B = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: B = None
        self.u: F = None
        self.t: D = None
        self.r: J = None
        self.p: I = None
        self.q: E = None
        self.z: A = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: C = None
        self.t: D = None
        self.p: C = None
        self.v: B = None
        self.x: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: F = None
        self.txt = txt

i = A("i")
m = B("m")
d = C("d")
e = D("e")
h = E("h")
c = F("c")
g = G("g")
f = H("f")
k = I("k")
a = J("a")

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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: H = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: F = None
        self.t: D = None
        self.u: A = None
        self.r: H = None
        self.v: I = None
        self.q: F = None
        self.x: B = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: I = None
        self.r: I = None
        self.x: B = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: B = None
        self.u: F = None
        self.t: D = None
        self.r: J = None
        self.p: I = None
        self.q: E = None
        self.z: A = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: C = None
        self.t: D = None
        self.p: C = None
        self.v: B = None
        self.x: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: F = None
        self.txt = txt

i = A("i")
m = B("m")
d = C("d")
e = D("e")
h = E("h")
c = F("c")
g = G("g")
f = H("f")
k = I("k")
a = J("a")

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