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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: F = None
        self.y: A = None
        self.u: F = None
        self.r: B = None
        self.z: G = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: B = None
        self.r: D = None
        self.txt = txt

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

l = A("l")
d = B("d")
a = C("a")
h = D("h")
m = E("m")
c = F("c")
j = G("j")
f = B("f")
b = A("b")
g = D("g")

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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: F = None
        self.y: A = None
        self.u: F = None
        self.r: B = None
        self.z: G = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: B = None
        self.r: D = None
        self.txt = txt

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

l = A("l")
d = B("d")
a = C("a")
h = D("h")
m = E("m")
c = F("c")
j = G("j")
f = B("f")
b = A("b")
g = D("g")

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