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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: E = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: D = None
        self.y: B = None
        self.o: A = None
        self.txt = txt

m = A("m")
f = B("f")
l = C("l")
c = D("c")
n = E("n")
i = F("i")
h = G("h")

m.s = i
m.r = i
m.x = c
m.q = f
f.v = c
f.z = c
f.t = n
l.v = n
l.t = n
l.s = m
l.w = m
l.u = f
l.y = c
l.q = c
c.r = l
c.s = f
c.w = n
c.p = h
c.t = i
n.z = l
n.y = l
n.t = l
n.x = f
i.p = c
i.y = n
i.z = n
i.o = m
i.x = f
i.r = h
i.s = l
h.s = c
h.v = c
h.y = f
h.o = m
assert i.r.o.x.t.txt == "
class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: D = None
        self.q: B = None
        self.r: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: E = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: D = None
        self.y: B = None
        self.o: A = None
        self.txt = txt

m = A("m")
f = B("f")
l = C("l")
c = D("c")
n = E("n")
i = F("i")
h = G("h")

m.s = i
m.r = i
m.x = c
m.q = f
f.v = c
f.z = c
f.t = n
l.v = n
l.t = n
l.s = m
l.w = m
l.u = f
l.y = c
l.q = c
c.r = l
c.s = f
c.w = n
c.p = h
c.t = i
n.z = l
n.y = l
n.t = l
n.x = f
i.p = c
i.y = n
i.z = n
i.o = m
i.x = f
i.r = h
i.s = l
h.s = c
h.v = c
h.y = f
h.o = m
assert i.r.o.x.t.txt == "i"