class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: C = None
        self.s: F = None
        self.r: H = None
        self.p: G = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: C = None
        self.x: B = None
        self.u: H = None
        self.txt = txt

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

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

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

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

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

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

f = A("f")
n = B("n")
b = C("b")
a = D("a")
k = E("k")
c = F("c")
m = G("m")
g = H("g")
l = B("l")
h = E("h")

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: C = None
        self.x: B = None
        self.u: H = None
        self.txt = txt

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

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

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

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

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

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

f = A("f")
n = B("n")
b = C("b")
a = D("a")
k = E("k")
c = F("c")
m = G("m")
g = H("g")
l = B("l")
h = E("h")

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