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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: F = None
        self.x: F = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: F = None
        self.o: B = None
        self.r: B = None
        self.y: E = None
        self.p: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: B = None
        self.q: F = None
        self.u: C = None
        self.txt = txt

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

g = A("g")
h = B("h")
d = C("d")
m = D("m")
a = E("a")
b = F("b")
n = G("n")
k = D("k")
i = F("i")
f = D("f")

g.u = b
g.z = a
g.x = f
g.t = h
h.p = n
h.v = d
h.o = f
h.z = b
h.r = a
h.y = m
d.u = g
d.y = i
d.x = b
d.z = a
m.z = k
m.p = k
m.x = b
m.o = h
m.r = h
m.y = a
a.r = g
a.y = h
b.y = n
b.o = h
b.q = i
b.u = d
n.z = h
k.z = f
k.x = b
k.o = h
k.r = h
k.y = a
k.p = m
i.y = n
i.o = h
i.q = b
i.u = d
f.z = k
f.x = b
f.o = h
f.r = h
f.y = a
f.p = m
assert b.u.y.o.z.u.y.q.y.z.r.txt == "
class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: E = None
        self.x: D = None
        self.t: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: F = None
        self.x: F = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: F = None
        self.o: B = None
        self.r: B = None
        self.y: E = None
        self.p: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: B = None
        self.q: F = None
        self.u: C = None
        self.txt = txt

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

g = A("g")
h = B("h")
d = C("d")
m = D("m")
a = E("a")
b = F("b")
n = G("n")
k = D("k")
i = F("i")
f = D("f")

g.u = b
g.z = a
g.x = f
g.t = h
h.p = n
h.v = d
h.o = f
h.z = b
h.r = a
h.y = m
d.u = g
d.y = i
d.x = b
d.z = a
m.z = k
m.p = k
m.x = b
m.o = h
m.r = h
m.y = a
a.r = g
a.y = h
b.y = n
b.o = h
b.q = i
b.u = d
n.z = h
k.z = f
k.x = b
k.o = h
k.r = h
k.y = a
k.p = m
i.y = n
i.o = h
i.q = b
i.u = d
f.z = k
f.x = b
f.o = h
f.r = h
f.y = a
f.p = m
assert b.u.y.o.z.u.y.q.y.z.r.txt == "a"