class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: F = None
        self.z: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: C = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: A = None
        self.p: A = None
        self.y: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: D = None
        self.p: F = None
        self.v: A = None
        self.o: D = None
        self.t: F = None
        self.x: C = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: C = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: A = None
        self.p: A = None
        self.y: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: D = None
        self.p: F = None
        self.v: A = None
        self.o: D = None
        self.t: F = None
        self.x: C = None
        self.z: F = None
        self.txt = txt

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

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