class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: D = None
        self.p: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: G = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: G = None
        self.r: F = None
        self.txt = txt

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

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