class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: G = None
        self.p: H = None
        self.t: G = None
        self.w: E = None
        self.z: C = None
        self.r: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: C = None
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: C = None
        self.t: A = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: C = None
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: C = None
        self.t: A = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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