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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: A = None
        self.o: F = None
        self.w: H = None
        self.r: D = None
        self.v: D = None
        self.p: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: F = None
        self.x: E = None
        self.o: D = None
        self.s: B = None
        self.q: D = None
        self.y: A = None
        self.z: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: A = None
        self.o: F = None
        self.w: H = None
        self.r: D = None
        self.v: D = None
        self.p: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: F = None
        self.x: E = None
        self.o: D = None
        self.s: B = None
        self.q: D = None
        self.y: A = None
        self.z: D = None
        self.txt = txt

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

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