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

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: E = None
        self.w: C = None
        self.r: F = None
        self.o: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: A = None
        self.s: E = None
        self.z: C = None
        self.r: D = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: B = None
        self.r: B = None
        self.u: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: E = None
        self.w: C = None
        self.r: F = None
        self.o: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: A = None
        self.s: E = None
        self.z: C = None
        self.r: D = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: B = None
        self.r: B = None
        self.u: A = None
        self.txt = txt

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

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