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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: H = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: A = None
        self.v: E = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: H = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: A = None
        self.v: E = None
        self.w: A = None
        self.txt = txt

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

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

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