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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: E = None
        self.z: A = None
        self.v: A = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: E = None
        self.z: A = None
        self.v: A = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

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

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