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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: A = None
        self.r: F = None
        self.p: E = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: A = None
        self.r: F = None
        self.p: E = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

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