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

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.u: C = None
        self.w: E = None
        self.p: D = None
        self.o: D = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: C = None
        self.z: B = None
        self.q: A = None
        self.w: A = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: B = None
        self.v: C = None
        self.z: B = None
        self.y: E = None
        self.s: A = None
        self.p: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.u: C = None
        self.w: E = None
        self.p: D = None
        self.o: D = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: C = None
        self.z: B = None
        self.q: A = None
        self.w: A = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: B = None
        self.v: C = None
        self.z: B = None
        self.y: E = None
        self.s: A = None
        self.p: D = None
        self.txt = txt

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

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