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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: C = None
        self.txt = txt

a = A("a")
c = B("c")
g = C("g")
n = D("n")
d = E("d")
b = F("b")
m = G("m")
i = G("i")
k = B("k")

a.u = d
a.o = m
a.y = g
a.q = n
a.w = n
a.v = k
c.o = d
c.r = d
c.s = n
c.w = b
c.x = m
g.v = m
g.w = a
n.q = a
n.t = g
n.u = b
d.t = a
d.p = a
d.s = n
d.x = i
d.o = k
b.r = d
b.s = g
b.q = g
b.o = g
b.t = a
b.x = n
m.u = d
m.q = g
i.u = d
i.q = g
k.o = d
k.r = d
k.s = n
k.w = b
k.x = m
assert a.w.q.u.x.u.s.t.v.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: G = None
        self.y: C = None
        self.q: D = None
        self.v: B = None
        self.w: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: C = None
        self.txt = txt

a = A("a")
c = B("c")
g = C("g")
n = D("n")
d = E("d")
b = F("b")
m = G("m")
i = G("i")
k = B("k")

a.u = d
a.o = m
a.y = g
a.q = n
a.w = n
a.v = k
c.o = d
c.r = d
c.s = n
c.w = b
c.x = m
g.v = m
g.w = a
n.q = a
n.t = g
n.u = b
d.t = a
d.p = a
d.s = n
d.x = i
d.o = k
b.r = d
b.s = g
b.q = g
b.o = g
b.t = a
b.x = n
m.u = d
m.q = g
i.u = d
i.q = g
k.o = d
k.r = d
k.s = n
k.w = b
k.x = m
assert a.w.q.u.x.u.s.t.v.u.txt == "d"