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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: G = None
        self.r: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: C = None
        self.u: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: G = None
        self.r: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: C = None
        self.u: E = None
        self.txt = txt

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

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

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