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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: D = None
        self.u: G = None
        self.x: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: A = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: G = None
        self.t: G = None
        self.y: G = None
        self.u: C = None
        self.q: E = None
        self.v: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: D = None
        self.u: G = None
        self.x: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: A = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: G = None
        self.t: G = None
        self.y: G = None
        self.u: C = None
        self.q: E = None
        self.v: A = None
        self.txt = txt

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

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

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