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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: E = None
        self.r: E = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: B = None
        self.u: H = None
        self.t: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: A = None
        self.y: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: E = None
        self.r: E = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: B = None
        self.u: H = None
        self.t: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: A = None
        self.y: G = None
        self.txt = txt

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

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