class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: A = None
        self.v: A = None
        self.t: E = None
        self.w: D = None
        self.s: E = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: G = None
        self.p: E = None
        self.q: F = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: A = None
        self.v: A = None
        self.t: E = None
        self.w: D = None
        self.s: E = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: G = None
        self.p: E = None
        self.q: F = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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