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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: D = None
        self.r: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: D = None
        self.r: A = None
        self.txt = txt

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

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