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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: A = None
        self.z: G = None
        self.s: C = None
        self.y: B = None
        self.p: A = None
        self.o: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: A = None
        self.z: G = None
        self.s: C = None
        self.y: B = None
        self.p: A = None
        self.o: C = None
        self.txt = txt

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

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