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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: E = None
        self.txt = txt

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

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

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

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