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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: F = None
        self.x: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: F = None
        self.x: H = None
        self.txt = txt

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

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

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

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

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

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

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

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