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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: F = None
        self.s: C = None
        self.y: G = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: B = None
        self.q: G = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: F = None
        self.s: C = None
        self.y: G = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: B = None
        self.q: G = None
        self.txt = txt

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

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

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

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