class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: B = None
        self.x: B = None
        self.t: C = None
        self.v: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: G = None
        self.q: A = None
        self.t: C = None
        self.x: D = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: D = None
        self.q: D = None
        self.r: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: G = None
        self.q: A = None
        self.t: C = None
        self.x: D = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: D = None
        self.q: D = None
        self.r: F = None
        self.txt = txt

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

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