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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: D = None
        self.p: C = None
        self.w: D = None
        self.t: G = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: F = None
        self.v: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: D = None
        self.p: C = None
        self.w: D = None
        self.t: G = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: F = None
        self.v: F = None
        self.txt = txt

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

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