class A:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: D = None
        self.x: C = None
        self.u: B = None
        self.w: B = None
        self.v: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: B = None
        self.u: E = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: E = None
        self.w: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: B = None
        self.u: E = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: E = None
        self.w: B = None
        self.txt = txt

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

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

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