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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: D = None
        self.r: H = None
        self.s: B = None
        self.z: D = None
        self.t: B = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: A = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: E = None
        self.w: E = None
        self.u: C = None
        self.o: A = None
        self.q: E = None
        self.txt = txt

e = A("e")
n = B("n")
m = C("m")
i = D("i")
j = E("j")
c = F("c")
k = G("k")
f = H("f")
a = B("a")
d = C("d")

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: D = None
        self.r: H = None
        self.s: B = None
        self.z: D = None
        self.t: B = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: A = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: E = None
        self.w: E = None
        self.u: C = None
        self.o: A = None
        self.q: E = None
        self.txt = txt

e = A("e")
n = B("n")
m = C("m")
i = D("i")
j = E("j")
c = F("c")
k = G("k")
f = H("f")
a = B("a")
d = C("d")

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