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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: A = None
        self.u: C = None
        self.p: H = None
        self.r: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: H = None
        self.z: H = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: A = None
        self.u: C = None
        self.p: H = None
        self.r: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: H = None
        self.z: H = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: B = None
        self.txt = txt

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

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

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