class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: B = None
        self.o: F = None
        self.p: B = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: G = None
        self.v: D = None
        self.y: D = None
        self.q: C = None
        self.x: C = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: C = None
        self.s: A = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: D = None
        self.q: B = None
        self.o: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: B = None
        self.o: F = None
        self.p: B = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: G = None
        self.v: D = None
        self.y: D = None
        self.q: C = None
        self.x: C = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: C = None
        self.s: A = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: D = None
        self.q: B = None
        self.o: C = None
        self.txt = txt

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

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

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