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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

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