class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: C = None
        self.x: G = None
        self.u: C = None
        self.p: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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