class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: B = None
        self.q: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: G = None
        self.y: A = None
        self.x: A = None
        self.q: F = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: B = None
        self.y: G = None
        self.r: E = None
        self.u: E = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: B = None
        self.q: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: G = None
        self.y: A = None
        self.x: A = None
        self.q: F = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: B = None
        self.y: G = None
        self.r: E = None
        self.u: E = None
        self.t: G = None
        self.txt = txt

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

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

e.y = a
b.u = c
j.t = e
j.o = e
j.s = a
j.r = f
j.v = b
d.r = g
d.t = b
d.q = f
a.v = i
a.t = c
a.y = e
a.x = e
a.q = g
a.z = b
g.o = i
g.v = b
g.y = c
g.t = c
g.r = a
g.u = a
c.v = b
c.o = g
c.u = f
c.x = a
c.p = d
i.v = a
i.t = c
i.y = e
i.x = e
i.q = g
i.z = b
f.r = g
f.t = b
f.q = d
assert b.u.o.o.v.z.u.p.txt == "d"