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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: D = None
        self.z: B = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

a = A("a")
g = B("g")
l = C("l")
j = D("j")
b = E("b")
i = F("i")
k = G("k")
h = F("h")

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: D = None
        self.z: B = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

a = A("a")
g = B("g")
l = C("l")
j = D("j")
b = E("b")
i = F("i")
k = G("k")
h = F("h")

a.q = g
a.w = g
a.u = k
a.t = l
a.x = l
g.t = b
g.s = j
g.r = k
g.p = l
l.q = a
j.p = l
j.x = i
b.x = g
b.w = g
b.u = a
b.p = l
b.z = k
b.v = i
i.o = g
i.s = g
i.p = k
i.z = k
i.r = j
i.t = j
k.y = a
k.t = a
k.o = a
k.x = j
k.z = g
h.o = g
h.s = g
h.p = k
h.z = k
h.r = j
h.t = j
assert a.q.p.q.u.txt == "k"