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

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

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: F = None
        self.z: C = None
        self.y: A = None
        self.x: G = None
        self.w: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: A = None
        self.w: A = None
        self.u: B = None
        self.p: B = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: F = None
        self.z: C = None
        self.y: A = None
        self.x: G = None
        self.w: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: A = None
        self.w: A = None
        self.u: B = None
        self.p: B = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: B = None
        self.txt = txt

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

b.w = n
b.x = n
b.u = j
b.q = e
i.r = g
i.u = e
i.q = a
i.w = a
i.o = n
i.t = n
i.y = b
j.w = n
j.y = n
j.r = d
e.t = d
e.x = d
e.p = n
e.z = j
e.y = b
e.w = a
a.z = e
a.u = e
a.x = m
a.o = n
a.v = j
a.q = d
n.v = a
n.r = b
n.w = m
n.z = m
n.u = g
n.p = g
d.v = m
d.q = i
m.w = n
m.x = n
m.u = j
m.q = e
g.r = i
g.u = e
g.q = a
g.w = a
g.o = n
g.t = n
g.y = m
assert d.v.u.y.p.u.x.v.u.txt == "j"