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

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

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

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

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

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

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

h = A("h")
k = B("k")
b = C("b")
c = D("c")
e = E("e")
n = F("n")
l = G("l")
d = F("d")
g = A("g")

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

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

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

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

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

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

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

h = A("h")
k = B("k")
b = C("b")
c = D("c")
e = E("e")
n = F("n")
l = G("l")
d = F("d")
g = A("g")

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