class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: G = None
        self.w: G = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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