class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: E = None
        self.o: C = None
        self.x: B = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: G = None
        self.t: F = None
        self.p: D = None
        self.v: C = None
        self.x: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: D = None
        self.o: G = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: D = None
        self.q: A = None
        self.r: G = None
        self.p: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: G = None
        self.t: F = None
        self.p: D = None
        self.v: C = None
        self.x: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: D = None
        self.o: G = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: D = None
        self.q: A = None
        self.r: G = None
        self.p: B = None
        self.txt = txt

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

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

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