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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: G = None
        self.y: C = None
        self.p: F = None
        self.x: G = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: G = None
        self.y: C = None
        self.p: F = None
        self.x: G = None
        self.w: B = None
        self.txt = txt

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

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