class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: E = None
        self.q: E = None
        self.r: E = None
        self.x: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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