class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: C = None
        self.r: D = None
        self.t: I = None
        self.s: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: C = None
        self.r: H = None
        self.o: A = None
        self.q: A = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: E = None
        self.t: F = None
        self.r: B = None
        self.txt = txt

f = A("f")
l = B("l")
i = C("i")
a = D("a")
k = E("k")
h = F("h")
m = G("m")
b = H("b")
e = I("e")
n = D("n")

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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: C = None
        self.r: H = None
        self.o: A = None
        self.q: A = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: E = None
        self.t: F = None
        self.r: B = None
        self.txt = txt

f = A("f")
l = B("l")
i = C("i")
a = D("a")
k = E("k")
h = F("h")
m = G("m")
b = H("b")
e = I("e")
n = D("n")

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