class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

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

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